<template>
  <div class="cardnumberupdate">
    <el-form :inline="true">
      <el-form-item label="征地项目：">
        <el-select v-model="value" placeholder="请选择">
          <el-option
            v-for="item in options"
            :key="item.value"
            slot="reference"
            :label="item.label"
            :value="item.value"
          />
        </el-select>
        <span @click="switchss">
          <el-button v-if="condition" class="el-icon-caret-top" 
            >项目详情</el-button
          >
          <el-button v-else class="el-icon-caret-bottom" 
            >项目详情</el-button
          >
        </span>

        <!-- 功能按钮 -->

        <el-button
          class="el-icon-circle-plus-outline"
          
          @click="dialogTableVisible = true"
          >导入文件</el-button
        >
        <el-button class="el-icon-edit-outline" >确认保存</el-button>
      </el-form-item>
    </el-form>

    <!-- 征地项目详情页 -->
    <el-table v-show="condition" :data="tableData" border style="width: 1831px" 
      :header-cell-style="{ 'text-align': 'center' }"
      :cell-style="{ 'text-align': 'center' }"
      :row-style="{ 'height': '48px'}">
      <el-table-column prop="vill" label="村" width="180" />
      <el-table-column prop="name" label="用地项目名称" />
      <el-table-column prop="years" label="年度" />
      <el-table-column prop="frequency" label="批次" />
      <el-table-column prop="massif" label="地块" />
      <el-table-column prop="date" label="基准日期" />
      <el-table-column prop="measure" label="用地面积（亩）" />
      <el-table-column prop="price" label="区片价" />
      <el-table-column prop="proportion" label="征缴比例" />
      <el-table-column prop="cost" label="社会保险费" />
    </el-table>

    <!-- 文件上传 -->
    <el-dialog title="文件上传" :visible.sync="dialogTableVisible">
      <el-upload
        class="upload-demo"
        drag
        action="https://jsonplaceholder.typicode.com/posts/"
        multiple
      >
        <i class="el-icon-upload" />
        <div class="el-upload__text">将文件拖到此处，或<em>点击上传</em></div>
        <div slot="tip" class="el-upload__tip">上传文件大小不超过500kb</div>
      </el-upload>
    </el-dialog>

    <!-- 上传文件展示列表 -->
    <!-- <el-table :data="tableList" border style="width: 1831px">
      <el-table-column prop="serial" label="序号" width="60"> </el-table-column>
      <el-table-column prop="tips" label="提示" width="180"> </el-table-column>
      <el-table-column prop="name" label="姓名" width="110"> </el-table-column>
      <el-table-column prop="sex" label="性别" width="60"> </el-table-column>
      <el-table-column prop="idCard" label="身份证号" width="180">
      </el-table-column>
      <el-table-column prop="guarantee" label="社保卡号" width="180">
      </el-table-column>
      <el-table-column prop="accountname" label="开户行名称" width="180">
      </el-table-column>
      <el-table-column prop="accountCard" label="银行账号" width="200">
      </el-table-column>
      <el-table-column prop="sociologytype" label="原有社保类型" width="180">
      </el-table-column>
      <el-table-column prop="Sociologystate" label="社保缴费状态" width="180">
      </el-table-column>
      <el-table-column
        prop="subsidy"
        label="享受困难补贴年限（月）"
        width="100"
      >
      </el-table-column>
      <el-table-column
        prop="pension"
        label="职工养老缴费年限（月）"
        width="100"
      >
      </el-table-column>
      <el-table-column prop="insured" label="参保类型" width="120">
      </el-table-column>
    </el-table>
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage4"
      :page-sizes="[10, 50 , 100, 200]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="this.tableList.length">
    </el-pagination>
     -->
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      msg: "人员信息导入",
      options: [
        {
          value: "选项1",
          label: "123--2019--96--01",
        },
      ],
      value: "",
      condition: false,
      dialogTableVisible: false, // 文件上传显示隐藏
      tableData: [],
      tableList: [],
      currentPage4: 1,
    };
  },
  methods: {
    switchss() {
      this.condition = !this.condition;
    },
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style scoped lang="scss">
.cardnumberupdate {
  padding: 30px;
  .el-button {
    margin-left: 10px;
  }
  .el-table {
    margin-bottom: 20px;
    .cell {
      text-align: center;
    }
  }
  .el-dialog__header {
    text-align: center;
  }
  .upload-demo {
    text-align: center;
    .el-dialog__title {
      margin: 0 auto;
    }
  }
}
</style>
